package com.springboot.consumer.dao.fallback;

import com.springboot.consumer.dao.UserFeignClient;
import com.springboot.consumer.pojo.User;
import org.springframework.stereotype.Component;

/**
 * @author XiaoLuo
 * @ClassName: UserFeignClientFallback
 * @Description: ${todo}
 * @date 2019/4/7 22:14
 */
@Component
public class UserFeignClientFallback implements UserFeignClient {
    @Override
    public User queryById(Long id) throws InterruptedException {

        User user = new User();
        user.setId(id);
        user.setName("用户查询出现异常！");
        return user;
    }
}
